; This program places templates built by "Make wood pipe templates.lsp" and "Make metal pipe templates.lsp" ; onto a windchest. ; If the windchest planting is in major thirds, increment is 5. ; To run, type -> (load"Place pipe template"). ; rev: May 30/93 (prompt (strcat (chr 13) (chr 10) "Loading file TINSERT......")) (defun c:TINSERT () (if (equal noteinc nil) (setq noteinc 1)) (setq n (getint (strcat "Enter increment between notes <" (itoa noteinc) ">: "))) (if (not (equal n nil)) (setq noteinc n)) (if (equal mark nil) (setq mark "")) (setq m (getstring (strcat "Name for template set <" mark ">: "))) (if (not (equal m "")) (setq mark m)) (setq n (getint "Number for first template to insert: ")) (setq bn (strcase (strcat mark "-" (itoa n)))) (if (not (equal nil (tblsearch "BLOCK" bn))) (progn (setq pt (getpoint (strcat "Point to locate template " bn ": "))) (command "INSERT" bn pt "" "" "") ) (progn (initget 1 "Y N") (setq resp (getkword (strcat "\n" bn " is not a defined block.\nContinue? (Y/N) :"))) (if (equal resp "N") (setq pt nil) (setq pt 1)) ) ) (while (not (equal pt nil)) (setq n (+ n noteinc)) (setq bn (strcase (strcat mark "-" (itoa n)))) (if (not (equal nil (tblsearch "BLOCK" bn))) (progn (setq pt (getpoint (strcat "Point to locate template " bn ": "))) (if (not (equal pt nil)) (command "INSERT" bn pt "" "" "")) ) (progn (initget 1 "Y N") (setq resp (getkword (strcat "\n" bn " is not a defined block.\nContinue? (Y/N) :"))) (if (equal resp "N") (setq pt nil)) ) ) ) (princ) ) (prompt (strcat "loaded." (chr 13) (chr 10))) (c:TINSERT)